﻿namespace WebApiTest.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class init : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.TestClass",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Name = c.String(maxLength: 50, unicode: false),
                        DataFile = c.Binary(storeType: "blob"),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.TestStudent",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Name = c.String(maxLength: 50, unicode: false),
                        DataFile = c.Binary(storeType: "blob"),
                    })
                .PrimaryKey(t => t.Id);
            
            CreateTable(
                "dbo.TestUser",
                c => new
                    {
                        Id = c.Int(nullable: false, identity: true),
                        Name = c.String(maxLength: 50, unicode: false),
                        TelPhone = c.String(maxLength: 11, fixedLength: true, unicode: false, storeType: "char"),
                        Age = c.Int(),
                        CreateData = c.DateTime(nullable: false, precision: 0),
                        Extend1 = c.Int(nullable: false),
                    })
                .PrimaryKey(t => t.Id);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.TestUser");
            DropTable("dbo.TestStudent");
            DropTable("dbo.TestClass");
        }
    }
}
